/*
#include<stdio.h>
void judge(int a,int b){
	if(a>=b) printf("%d",a);
	else printf("%d",b);
}
int main(){
	int a,b;
	scanf("%d %d",&a,&b);
	judge(a,b);
	return 0;
}

#include <stdio.h>

int main() {
    int a;
    while (scanf("%d", &a) != EOF){
        if(a%2==0) printf("Even\n") ;
        else printf("Odd\n");
    }
    return 0;
}



#include <stdio.h>

int main() {
    int a;
    while (scanf("%d", &a) != EOF) { 
        if(a>=60) printf("Pass\n");
        else printf("Fail\n");
    }
    return 0;
}




#include <stdio.h>

int main() {
    int a;
    while (scanf("%d", &a) != EOF) {
        if(a>=90&&a<=100) printf("Perfect");
        
    }
    return 0;
}
*/
/*
#include<stdio.h>
//乘法表
int main(){
	int a,b;
	for(a=1;a<=9;a++){
		for(b=1;b<=a;b++){
			printf("%d*%d=%d ",a,b,a*b);
		}
		printf("\n");
	}
	return 0;
}
*/

/*
#include<stdio.h>
//寻找十个数中最大数
int main(){
	int a[11],i;
	for(i=0;i<10;i++){
		scanf("%d",&a[i]);
}
a[10]=a[0];
for(i=0;i<10;i++){
	a[i]>a[10]?a[10]=a[i]:a[10]=a[i];
}
printf("%d",a[10]);
return 0;
}

*/

/*
//求表达式值
#include<stdio.h>
int main(){
	float n=0,i;
	int m=1;
	for(i=1;i<=100;i++){
		if(m%2==0) n=n-1/i;
		else n=n+1/i;
		m++;
	}
	printf("%f",n);
	return 0;
}*/
/*
#include<stdio.h>
//数九的数字
int main(){
int a,i;
for(i=1;i<=100;i++){
	if(i%9==1) a=a+1;
	if(i%9==11) a=a+2;
}
printf("%d",a);
return 0;

}
*/

//二分查找
#include<stdio.h>
int main(){
	int a[100];
	for(int i=0;i<100;i++){
		a[i]=i;
			}
	int n;
	printf("please input the number that you want to find\n");
	scanf("%d",&n);
	int m=0,b=50;
	int mid,left=0,right=99;
	while(left<=right){
		mid=(left+right)/2;
		if(n>a[mid]) left=mid+1;
		if(n<a[mid]) right=mid-1;
		if(n==a[mid]){printf("%d",mid);break;}
	}
	if(n!=a[mid]) printf("no find");
	return 0;
}









































